<% layout('/layouts/default.html', {title: 'tk_my_task管理', libs: ['dataGrid']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header">
			<div class="box-title">
				<i class="fa icon-notebook"></i> ${text('任务审核管理')}
			</div>
			<div class="box-tools pull-right">
				<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a>
				<% if(hasPermi('tk:tkMyTask:edit')){ %>
					<a href="${ctx}/tk/tkMyTask/form" class="btn btn-default btnTool" title="${text('新增tk_my_task')}"><i class="fa fa-plus"></i> ${text('新增')}</a>
				<% } %>
				<a href="#" class="btn btn-default" id="btnSetting" title="${text('设置')}"><i class="fa fa-navicon"></i></a>
			</div>
		</div>
		<div class="box-body">
			<#form:form id="searchForm" model="${tkMyTask}" action="${ctx}/tk/tkMyTask/listData" method="post" class="form-inline hide"
					data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
				<#form:hidden path="myTaskStatus" maxlength="255" class="form-control width-120"/>
				<#form:hidden path="type" maxlength="255" class="form-control width-120"/>
				<div class="form-group">
					<label class="control-label">${text('项目名称/APP名称')}：</label>
					<div class="control-inline">
						<#form:input path="projectName" maxlength="255" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
					<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
				</div>
			</#form:form>
			<table id="dataGrid"></table>
			<div id="dataGridPage"></div>
		</div>
	</div>
</div>
<% } %>
<script>
// 初始化DataGrid对象
$('#dataGrid').dataGrid({
	searchForm: $("#searchForm"),
	columnModel: [
		{header:'${text("用户手机号")}', name:'yonghuUser.mobile', index:'a.project_name', width:150, align:"left", frozen:true},
		{header:'${text("项目名称/APP名称")}', name:'projectName', index:'a.project_name', width:150, align:"left", frozen:true},
		{header:'${text("类型")}', name:'taskType', width:150, align:"left", formatter: function(val, obj, row, act){
				return js.getDictLabel(${@DictUtils.getDictListJson('tk_type')}, val, '${text("未知")}', true);
			}},
		{header:'${text("标题")}', name:'title', index:'a.title', width:150, align:"left"},
		{header:'${text("任务描述")}', name:'explainStr', index:'a.explain', width:150, align:"left"},
		{header:'${text("提交时常")}', name:'submitTimes', index:'a.submit_times', width:150, align:"left"},
		{header:'${text("审核时常")}', name:'examineTimes', index:'a.examine_times', width:150, align:"left"},
		{header:'${text("操作设备类型")}', name:'devType', index:'a.dev_type', width:100, align:"center", formatter: function(val, obj, row, act){
				return js.getDictLabel(${@DictUtils.getDictListJson('task_dev_type')}, val, '${text("未知")}', true);
			}},
		{header:'${text("做单方式")}', name:'zuodanNumType', index:'a.zuodan_num_type', width:150, align:"center", formatter: function(val, obj, row, act){
				return js.getDictLabel(${@DictUtils.getDictListJson('tk_zuodan_num_type')}, val, '${text("未知")}', true);
			}},
		{header:'${text("悬赏单价")}', name:'price', index:'a.price', width:100, align:"right", formatter: function(val, obj, row, act){
				return js.formatNumber(val, 2, false, ''); // 数值类型格式化 (原始数值, 小数位数, 是否千分位, 默认值，金额情况下设置0.00);
			}},
		{header:'${text("创建时间")}', name:'createTime', index:'a.create_time', width:150, align:"center"},
		{header:'${text("操作")}', name:'actions', width:120, formatter: function(val, obj, row, act){

			var actions = [];
			actions.push('<a href="${ctx}/tk/tkMyTask/taskInfo?id='+row.id+'" class="btnList" title="${text("详情")}">详情</a>&nbsp;');
			return actions.join('');
		}}
	],
	// 加载成功后执行事件
	ajaxSuccess: function(data){
		
	}
});
</script>